
#include <QSettings>
#include <QTextCodec>
#include <QApplication>

#include "nservercore.h"

int main(int argc, char ** argv)
{
    QTextCodec::setCodecForTr(QTextCodec::codecForName("UTF-8"));

#if !defined(Q_WS_WIN)
    // QtService stores service settings in SystemScope, which normally require root privileges.
    // To allow testing this example as non-root, we change the directory of the SystemScope settings file.
    QSettings::setPath(QSettings::NativeFormat, QSettings::SystemScope, QDir::tempPath());
    qWarning("(Saving all settings at %s)", QDir::tempPath().toLatin1().constData());
#endif

    //NServerService service(argc, argv);
    //return service.exec();

    QApplication a(argc, argv);
    NServerCore* core = new NServerCore("./main.conf");
    return a.exec();
}
